package ru.alexbykov.nopaginate.item;

import ohos.agp.components.Component;
import ohos.agp.components.ComponentContainer;
import ohos.agp.components.LayoutScatter;

import ru.alexbykov.nopaginate.ResourceTable;

/**
 * Created by Alex Bykov on 11.08.2017.
 * You can contact me at: me@alexbykov.ru.
 */
public interface LoadingItem extends BaseLinearLayoutManagerItem {
    LoadingItem DEFAULT = new LoadingItem() {
        @Override
        public Component getComponent(int position, Component component, ComponentContainer componentContainer) {
            Component view = LayoutScatter.getInstance(componentContainer.getContext())
                .parse(ResourceTable.Layout_item_loading, null, false);
            return view;
        }
    };
}
